#include <iostream>

#include "webview/webview.h"

#ifdef _WIN32
int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/,
                   LPSTR /*lpCmdLine*/, int /*nCmdShow*/) {
#else
int main() {
#endif
    try {
        webview::webview w(false, nullptr);
        w.set_title("Basic Example");
        w.set_size(480, 320, WEBVIEW_HINT_NONE);
        w.set_html("<h1>Thanks for using webview!</h1>");
        w.set_html("<li>second line!</li>");
        w.window();
        w.run();
    } catch (const webview::exception &e) {
        std::cerr << e.what() << '\n';
        return 1;
    }

    return 0;
}
